(function(){if(typeof this.BX!=="undefined"&&typeof this.BX.Vue3!=="undefined"&&typeof this.BX.Vue3.Vuex!=="undefined"){var e="4.0.2";if(this.BX.Vue3.Vuex.version!==e){console.warn("BX.Vue3.Vuex already loaded. Loaded: "+this.BX.Vue3.Vuex.version+", Skipped: "+e+". Version differences may cause errors!")}return}this.BX=this.BX||{};this.BX.Vue3=this.BX.Vue3||{};(function(e,t,r,i,o){"use strict";
/**
	 * Bitrix Vuex wrapper
	 * IndexedDB driver for Vuex Builder
	 *
	 * @package bitrix
	 * @subpackage ui
	 * @copyright 2001-2022 Bitrix
	 */class n{constructor(e={}){this.siteId=e.siteId||"default";this.userId=e.userId||0;this.storage=e.storage||"default";this.name=e.name||"";this.code=(window.md5||r.md5)(this.siteId+"/"+this.userId+"/"+this.storage+"/"+this.name);this.db=new t.Dexie("bx-vuex-model");this.db.version(1).stores({data:"code, value"})}get(){return new Promise(((e,t)=>{this.db.data.where("code").equals(this.code).first().then((t=>{e(t?t.value:null)}),(e=>{t(e)}))}))}set(e){return new Promise(((t,r)=>{this.db.data.put({code:this.code,value:e}).then((()=>{t(true)}),(e=>{r(e)}))}))}clear(){return new Promise(((e,t)=>{this.db.data.delete(this.code).then((()=>{e(true)}),(e=>{t(e)}))}))}}
/**
	 * Bitrix Vuex wrapper
	 * LocalStorage driver for Vuex Builder
	 *
	 * @package bitrix
	 * @subpackage ui
	 * @copyright 2001-2022 Bitrix
	 */class s{constructor(e={}){this.siteId=e.siteId||"default";this.userId=e.userId||0;this.storage=e.storage||"default";this.name=e.name||"";this.enabled=false;if(!i.Type.isUndefined(window.localStorage)){try{window.localStorage.setItem("__bx_test_ls_feature__","ok");if(window.localStorage.getItem("__bx_test_ls_feature__")==="ok"){window.localStorage.removeItem("__bx_test_ls_feature__");this.enabled=true}}catch(e){}}this.code="bx-vuex-"+(window.md5||r.md5)(this.siteId+"/"+this.userId+"/"+this.storage+"/"+this.name)}get(){return new Promise(((e,t)=>{if(!this.enabled){e(null);return true}const r=window.localStorage.getItem(this.code);if(!i.Type.isString(r)){e(null);return true}try{e(this.prepareValueAfterGet(JSON.parse(r)))}catch(e){t(e)}}))}set(e){return new Promise((t=>{if(this.enabled){window.localStorage.setItem(this.code,JSON.stringify(this.prepareValueBeforeSet(e)))}t(true)}))}clear(){return new Promise((e=>{if(this.enabled){window.localStorage.removeItem(this.code)}e(true)}))}prepareValueAfterGet(e){if(e instanceof Array){e=e.map((e=>this.prepareValueAfterGet(e)))}else if(e instanceof Date);else if(i.Type.isObjectLike(e)){for(const t in e){if(e.hasOwnProperty(t)){e[t]=this.prepareValueAfterGet(e[t])}}}else if(i.Type.isString(e)){if(e.startsWith("#DT#")){e=new Date(e.substring(4))}}return e}prepareValueBeforeSet(e){if(e instanceof Array){e=e.map((e=>this.prepareValueBeforeSet(e)))}else if(e instanceof Date){e="#DT#"+e.toISOString()}else if(i.Type.isObjectLike(e)){for(const t in e){if(e.hasOwnProperty(t)){e[t]=this.prepareValueBeforeSet(e[t])}}}return e}}
/**
	 * Bitrix Vuex wrapper
	 * BitrixMobile ApplicationStorage driver for Vuex Builder
	 *
	 * @package bitrix
	 * @subpackage ui
	 * @copyright 2001-2022 Bitrix
	 */class a{constructor(e={}){this.siteId=e.siteId||"default";this.userId=e.userId||0;this.storage=e.storage||"default";this.name=e.name||"";this.code=(window.md5||r.md5)(this.siteId+"/"+this.userId+"/"+this.storage+"/"+this.name);if(!this.isJnContext()&&i.Type.isUndefined(ApplicationStorage)){console.error('ApplicationStorage is not defined, load "webcomponent/storage" extension.')}}get(){return new Promise((e=>{if(this.isJnContext()){const t=Application.sharedStorage.get(this.code);e(t?t:null)}else if(!i.Type.isUndefined(ApplicationStorage)){ApplicationStorage.get(this.code,null).then((t=>e(this.prepareValueAfterGet(JSON.parse(t)))))}else{e(null)}}))}set(e){return new Promise((t=>{if(this.isJnContext()){Application.sharedStorage().set(this.code,JSON.stringify(this.prepareValueBeforeSet(e)));t()}else if(!i.Type.isUndefined(ApplicationStorage)){ApplicationStorage.set(this.code,JSON.stringify(this.prepareValueBeforeSet(e))).then((()=>t()))}else{t()}}))}clear(){return this.set(null)}isJnContext(){return!i.Type.isUndefined(env)}prepareValueAfterGet(e){if(e instanceof Array){e=e.map((e=>this.prepareValueAfterGet(e)))}else if(e instanceof Date);else if(i.Type.isObjectLike(e)){for(const t in e){if(e.hasOwnProperty(t)){e[t]=this.prepareValueAfterGet(e[t])}}}else if(i.Type.isString(e)){if(e.startsWith("#DT#")){e=new Date(e.substring(4))}}return e}prepareValueBeforeSet(e){if(e instanceof Array){e=e.map((e=>this.prepareValueBeforeSet(e)))}else if(e instanceof Date){e="#DT#"+e.toISOString()}else if(i.Type.isObjectLike(e)){for(const t in e){if(e.hasOwnProperty(t)){e[t]=this.prepareValueBeforeSet(e[t])}}}return e}}
/**
	 * Bitrix Vuex wrapper
	 * Interface Vuex model (Vuex builder model)
	 *
	 * @package bitrix
	 * @subpackage ui
	 * @copyright 2001-2022 Bitrix
	 */var u=babelHelpers.classPrivateFieldLooseKey("getStoreFromDatabase");var c=babelHelpers.classPrivateFieldLooseKey("mergeState");var l=babelHelpers.classPrivateFieldLooseKey("createStore");class d{static create(){return new this}getName(){return""}getState(){return{}}getElementState(e={}){return{}}getStateSaveException(){return undefined}getGetters(){return{}}getActions(){return{}}getMutations(){return{}}getNestedModules(){return{}}validate(e,t={}){return{}}setVariables(e={}){if(!i.Type.isObjectLike(e)){this.logger("error","BuilderModel.setVariables: passed variables is not a Object","Model: "+this.getName(),{variables:e},store);return this}this.variables=e;return this}getVariable(e,t=undefined){if(!e){return t}const r=e.toString().split(".");if(r.length===1){return this.variables[r[0]]}let o;let n=Object.assign({},this.variables);for(let e=0;e<r.length;e++){if(!i.Type.isUndefined(n[r[e]])){n=o=n[r[e]]}else{o=t;break}}return o}getNamespace(){return this.namespace?this.namespace:this.getName()}setNamespace(e){this.namespace=e.toString();this.databaseConfig.name=this.namespace;return this}useDatabase(e,t={}){this.databaseConfig.active=!!e;let r=this.db===null;if(t.type){this.databaseConfig.type=t.type.toString();r=true}if(t.storage){this.databaseConfig.storage=t.storage.toString()}if(t.siteId){this.databaseConfig.siteId=t.siteId.toString()}if(t.userId){this.databaseConfig.userId=t.userId}if(i.Type.isInteger(t.timeout)){this.databaseConfig.timeout=t.timeout}if(!this.databaseConfig.active&&this.db!==null){this.databaseConfig.type=null;r=true}if(r){if(this.databaseConfig.type===m.indexedDb){this.db=new n(this.databaseConfig)}else if(this.databaseConfig.type===m.localStorage){this.db=new s(this.databaseConfig)}else if(this.databaseConfig.type===m.jnSharedStorage){this.db=new a(this.databaseConfig)}else{this.db=null}}return this}useNamespace(e){if(o.BitrixVue.developerMode){if(e){console.warn("BuilderModel: Method `useNamespace` is deprecated, please remove this call.")}else{console.error("BuilderModel: Method `useNamespace` is deprecated, using Vuex.Builder without namespaces is no longer supported.")}}return this}getStore(){console.warn("BuilderModel: Method `getStore` is deprecated, please remove this call.");return this.getModule()}getModule(){return new Promise(((e,t)=>{const r=this.namespace?this.namespace:this.getName();if(!r){this.logger("error","VuexModel.getStore: current model can not be run in Vuex modules mode",this.getState());t()}if(this.db){babelHelpers.classPrivateFieldLooseBase(this,u)[u]().then((t=>e({namespace:r,module:babelHelpers.classPrivateFieldLooseBase(this,l)[l](t)})))}else{e({namespace:r,module:babelHelpers.classPrivateFieldLooseBase(this,l)[l](this.getState())})}}))}getNestedModule(e){const t={constructor:e};const r=new t["constructor"];return{namespaced:true,state:r.getState(),getters:r.getGetters(),actions:r.getActions(),mutations:r.getMutations()}}getModuleWithDefaultState(){const e=this.namespace?this.namespace:this.getName();if(!e){this.logger("error","VuexModel.getStore: current model can not be run in Vuex modules mode",this.getState());return null}return{namespace:e,module:babelHelpers.classPrivateFieldLooseBase(this,l)[l](this.getState())}}getSaveTimeout(){return 150}getLoadTimeout(){return 1e3}getLoadedState(e={}){return e}saveState(e={}){if(!this.isSaveAvailable()){return true}this.lastSaveState=e;if(this.saveStateTimeout){this.logger("log","VuexModel.saveState: wait save...",this.getName());return true}this.logger("log","VuexModel.saveState: start saving",this.getName());let t=this.getSaveTimeout();if(i.Type.isInteger(this.databaseConfig.timeout)){t=this.databaseConfig.timeout}this.saveStateTimeout=setTimeout((()=>{this.logger("log","VuexModel.saveState: saved!",this.getName());let e=this.lastSaveState;if(i.Type.isFunction(e)){e=e();if(!i.Type.isObjectLike(e)||!e){return false}}this.db.set(this.cloneState(e,this.getStateSaveException()));this.lastState=null;this.saveStateTimeout=null}),t);return true}clearState(){if(this.store){this.store.commit(this.getNamespace()+"/"+"vuexBuilderModelClearState");return true}return this.saveState(this.getState())}clearDatabase(){if(!this.isSaveAvailable()){return true}this.db.clear();return true}isSaveAvailable(){return this.db&&this.databaseConfig.active}isSaveNeeded(e){if(!this.isSaveAvailable()){return false}const t=function(e,r=null){if(!r){return true}for(const o in e){if(!e.hasOwnProperty(o)){continue}if(i.Type.isUndefined(r[o])){return true}else if(i.Type.isObjectLike(r[o])){const i=t(e[o],r[o]);if(i){return true}}}return false};return t(e,this.getStateSaveException())}constructor(){Object.defineProperty(this,l,{value:p});Object.defineProperty(this,u,{value:f});this.databaseConfig={type:m.indexedDb,active:null,storage:"default",name:this.getName(),siteId:"default",userId:0,timeout:null};this.db=null;this.store=null;this.namespace=null;this.variables={}}setStore(e){if(!(e instanceof me)){this.logger("error","VuexModel.setStore: passed store is not a Vuex.Store",e);return this}this.store=e;return this}prepareNestedModules(){const e=Object.entries(this.getNestedModules());if(e.length===0){return null}const t={};e.forEach((([e,r])=>{t[e]=this.getNestedModule(r)}));return t}static convertToArray(e){const t=[];for(const r in e){if(e.hasOwnProperty(r)){t.push(e[r])}}return t}cloneState(e,t=undefined){let r;if(e instanceof Array){r=[].concat(e.map((e=>this.cloneState(e))))}else if(e instanceof Date){r=new Date(e.toISOString())}else if(i.Type.isObjectLike(e)){r={};for(const o in e){if(!e.hasOwnProperty(o)){continue}if(i.Type.isUndefined(t)||i.Type.isUndefined(t[o])){r[o]=this.cloneState(e[o])}else if(i.Type.isObjectLike(t[o])){r[o]=this.cloneState(e[o],t[o])}}}else{r=e}return r}logger(e,...t){if(e==="error"){console.error(...t);return}else if(!o.BitrixVue.developerMode){return}if(e==="log"){console.log(...t)}else if(e==="info"){console.info(...t)}else if(e==="warn"){console.warn(...t)}}}function f(){clearTimeout(this.cacheTimeout);return new Promise((e=>{const t=this.getLoadTimeout();if(t!==false&&i.Type.isInteger(t)){this.cacheTimeout=setTimeout((()=>{this.logger("warn","VuexModel.getStoreFromDatabase: Cache loading timeout",this.getName());e(this.getState())}),t)}else{this.cacheTimeout=null}this.db.get().then((t=>{clearTimeout(this.cacheTimeout);t=this.getLoadedState(t?t:{});let r=this.getState();if(t){r=babelHelpers.classPrivateFieldLooseBase(d,c)[c](r,t)}e(r)}),(()=>{clearTimeout(this.cacheTimeout);e(this.getState())}))}))}function h(e,t){for(const r in e){if(!e.hasOwnProperty(r)){continue}if(i.Type.isUndefined(t[r])){t[r]=e[r]}else if(!(t[r]instanceof Array)&&i.Type.isObjectLike(t[r])&&i.Type.isObjectLike(e[r])){t[r]=Object.assign({},e[r],t[r])}}return t}function p(e){const t={namespaced:true,state:e,getters:this.getGetters(),actions:this.getActions(),mutations:this.getMutations()};const r=this.prepareNestedModules();if(r){t.modules=r}t.mutations.vuexBuilderModelClearState=e=>{e=Object.assign(e,this.getState());this.saveState(e)};return t}Object.defineProperty(d,c,{value:h});
/**
	 * Bitrix Vuex wrapper
	 * Vuex builder
	 *
	 * @package bitrix
	 * @subpackage ui
	 * @copyright 2001-2022 Bitrix
	 */const m=Object.freeze({indexedDb:"indexedDb",localStorage:"localStorage",jnSharedStorage:"jnSharedStorage"});class g{static create(){if(BitrixVue.developerMode){console.warn("VuexBuilder: Method VuexBuilder.create is deprecated, use VuexBuilder.init instead.")}return new this}static init(e){if(e){if(!(e instanceof Vuex.Store)){console.warn("VuexBuilder.init: passed store is not a Vuex.Store",e);return new this}}return new this(e)}constructor(e){this.models=[];this.databaseConfig={name:null,type:null,siteId:null,userId:null,timeout:null};this.store=e;this.builded=false}addModel(e){if(this.builded){return this}if(!(e instanceof d)){console.error("VuexBuilder.addModel: passed model is not a BuilderModel",e);return this}this.models.push(e);return this}addDynamicModel(e){if(!(e instanceof d)){return new Promise(((t,r)=>{console.error("VuexBuilder.addDynamicModel: passed model is not a BuilderModel",e);r("MODEL_ERROR")}))}if(this.store.hasModule(e.getNamespace())||this.models.find((t=>t.getNamespace()===e.getNamespace()))){return new Promise(((t,r)=>{console.error("BX.VuexBuilder.addDynamicModel: model `"+e.getNamespace()+"` was not added because it is already registered.");r("DUPLICATE_MODEL")}))}this.models.push(e);if(this.databaseConfig.active&&e.databaseConfig.active!==false){e.useDatabase(true,this.databaseConfig)}else{e.useDatabase(false)}e.setStore(this.store);const t=e.getModule();return new Promise(((e,r)=>{t.then((t=>{this.store.registerModule(t.namespace,t.module);e()}),(e=>{console.error("BX.VuexBuilder.addDynamicModel: storage was not created due to runtime errors.",e?e:"");r("ERROR_IN_MODEL")}))}))}removeDynamicModel(e){if(!this.builded){console.error("BX.VuexBuilder.removeDynamicModel: you cannot use the method until builder is built.");return this}if(!this.store.hasModule(e)){console.error("BX.VuexBuilder.removeDynamicModel: module `"+e+"` not registered.");return this}this.models=this.models.filter((t=>t.getNamespace()!==e));this.store.unregisterModule(e);return this}useNamespace(e){if(BitrixVue.developerMode){if(e){console.warn("VuexBuilder: Method `useNamespace` is deprecated, please remove this call.")}else{console.error("VuexBuilder: Method `useNamespace` is deprecated, using VuexBuilder without namespaces is no longer supported.")}}return this}setDatabaseConfig(e={}){if(!i.Type.isObjectLike(e)){return this}this.databaseConfig.active=true;this.databaseConfig.storage=e.name;this.databaseConfig.type=e.type||this.databaseConfig.type;this.databaseConfig.siteId=e.siteId||this.databaseConfig.siteId;this.databaseConfig.userId=e.userId||this.databaseConfig.userId;this.databaseConfig.timeout=!i.Type.isUndefined(e.timeout)?e.timeout:this.databaseConfig.timeout;return this}clearModelState(e=null){if(!this.builded){return new Promise(((t,r)=>{console.error("BX.VuexBuilder.clearModelState: you cannot use the method until builder is built.");if(!i.Type.isFunction(e)){r("BUILDER_NOT_BUILD")}}))}const t=[];this.models.forEach((e=>{t.push(e.clearState())}));return new Promise(((r,o)=>{Promise.all(t).then((()=>{r(true);if(i.Type.isFunction(e)){e(true)}}),(t=>{console.error("BX.VuexBuilder.clearModelState: storage was not clear due to runtime errors.",t?t:"");if(!i.Type.isFunction(e)){o("ERROR_WHILE_CLEARING")}}))}))}clearDatabase(){if(!this.builded){return new Promise(((e,t)=>{console.error("BX.VuexBuilder.clearModelState: you cannot use the method until builder is built.");t("BUILDER_NOT_BUILD")}))}this.models.forEach((e=>e.clearDatabase()));return new Promise((e=>e(true)))}build(e=null){if(this.builded){return this}const t=[];if(!this.store){this.store=pe()}this.models.forEach((e=>{if(this.databaseConfig.active&&e.databaseConfig.active!==false){e.useDatabase(true,this.databaseConfig)}e.setStore(this.store);t.push(e.getModule())}));return new Promise(((r,o)=>{Promise.all(t).then((t=>{t.forEach((e=>{this.store.registerModule(e.namespace,e.module)}));const o={store:this.store,models:this.models,builder:this};this.builded=true;if(i.Type.isFunction(e)){e(o)}r(o)}),(t=>{console.error("BX.VuexBuilder.create: storage was not created due to runtime errors.",t?t:"");if(!i.Type.isFunction(e)){o("ERROR_IN_MODEL")}}))}))}syncBuild(){if(this.builded){return{store:this.store,models:this.models,builder:this}}if(!this.store){this.store=pe()}if(this.databaseConfig.active){if(BitrixVue.developerMode){console.error("VuexBuilder: Method `syncBuild` creates storage in synchronous mode, the database does not work in this mode.")}this.databaseConfig.active=false}this.models.forEach((e=>{e.useDatabase(false);e.setStore(this.store);const{namespace:t,module:r}=e.getModuleWithDefaultState();this.store.registerModule(t,r)}));this.builded=true;return{store:this.store,models:this.models,builder:this}}}
/*!
	 * vuex v4.0.2
	 * (c) 2021 Evan You
	 * @license MIT
	 *
	 * @source: https://unpkg.com/vuex@4.0.2/dist/vuex.esm-browser.js
	 */function v(){return b().__VUE_DEVTOOLS_GLOBAL_HOOK__}function b(){return typeof navigator!=="undefined"?window:typeof global!=="undefined"?global:{}}const y="devtools-plugin:setup";function _(e,t){const r=v();if(r){r.emit(y,e,t)}else{const r=b();const i=r.__VUE_DEVTOOLS_PLUGINS__=r.__VUE_DEVTOOLS_PLUGINS__||[];i.push({pluginDescriptor:e,setupFn:t})}}var S="store";function w(e){if(e===void 0)e=null;return o.inject(e!==null?e:S)}function x(e,t){return e.filter(t)[0]}function M(e,t){if(t===void 0)t=[];if(e===null||typeof e!=="object"){return e}var r=x(t,(function(t){return t.original===e}));if(r){return r.copy}var i=Array.isArray(e)?[]:{};t.push({original:e,copy:i});Object.keys(e).forEach((function(r){i[r]=M(e[r],t)}));return i}function O(e,t){Object.keys(e).forEach((function(r){return t(e[r],r)}))}function V(e){return e!==null&&typeof e==="object"}function B(e){return e&&typeof e.then==="function"}function C(e,t){if(!e){throw new Error("[vuex] "+t)}}function T(e,t){return function(){return e(t)}}function I(e,t,r){if(t.indexOf(e)<0){r&&r.prepend?t.unshift(e):t.push(e)}return function(){var r=t.indexOf(e);if(r>-1){t.splice(r,1)}}}function A(e,t){e._actions=Object.create(null);e._mutations=Object.create(null);e._wrappedGetters=Object.create(null);e._modulesNamespaceMap=Object.create(null);var r=e.state;E(e,r,[],e._modules.root,true);j(e,r,t)}function j(e,t,r){var i=e._state;e.getters={};e._makeLocalGettersCache=Object.create(null);var n=e._wrappedGetters;var s={};O(n,(function(t,r){s[r]=T(t,e);Object.defineProperty(e.getters,r,{get:function(){return s[r]()},enumerable:true})}));e._state=o.reactive({data:t});if(e.strict){G(e)}if(i){if(r){e._withCommit((function(){i.data=null}))}}}function E(e,t,r,i,o){var n=!r.length;var s=e._modules.getNamespace(r);if(i.namespaced){if(e._modulesNamespaceMap[s]&&true){console.error("[vuex] duplicate namespace "+s+" for the namespaced module "+r.join("/"))}e._modulesNamespaceMap[s]=i}if(!n&&!o){var a=U(t,r.slice(0,-1));var u=r[r.length-1];e._withCommit((function(){{if(u in a){console.warn('[vuex] state field "'+u+'" was overridden by a module with the same name at "'+r.join(".")+'"')}}a[u]=i.state}))}var c=i.context=D(e,s,r);i.forEachMutation((function(t,r){var i=s+r;P(e,i,t,c)}));i.forEachAction((function(t,r){var i=t.root?r:s+r;var o=t.handler||t;k(e,i,o,c)}));i.forEachGetter((function(t,r){var i=s+r;L(e,i,t,c)}));i.forEachChild((function(i,n){E(e,t,r.concat(n),i,o)}))}function D(e,t,r){var i=t==="";var o={dispatch:i?e.dispatch:function(r,i,o){var n=X(r,i,o);var s=n.payload;var a=n.options;var u=n.type;if(!a||!a.root){u=t+u;if(!e._actions[u]){console.error("[vuex] unknown local action type: "+n.type+", global type: "+u);return}}return e.dispatch(u,s)},commit:i?e.commit:function(r,i,o){var n=X(r,i,o);var s=n.payload;var a=n.options;var u=n.type;if(!a||!a.root){u=t+u;if(!e._mutations[u]){console.error("[vuex] unknown local mutation type: "+n.type+", global type: "+u);return}}e.commit(u,s,a)}};Object.defineProperties(o,{getters:{get:i?function(){return e.getters}:function(){return N(e,t)}},state:{get:function(){return U(e.state,r)}}});return o}function N(e,t){if(!e._makeLocalGettersCache[t]){var r={};var i=t.length;Object.keys(e.getters).forEach((function(o){if(o.slice(0,i)!==t){return}var n=o.slice(i);Object.defineProperty(r,n,{get:function(){return e.getters[o]},enumerable:true})}));e._makeLocalGettersCache[t]=r}return e._makeLocalGettersCache[t]}function P(e,t,r,i){var o=e._mutations[t]||(e._mutations[t]=[]);o.push((function t(o){r.call(e,i.state,o)}))}function k(e,t,r,i){var o=e._actions[t]||(e._actions[t]=[]);o.push((function t(o){var n=r.call(e,{dispatch:i.dispatch,commit:i.commit,getters:i.getters,state:i.state,rootGetters:e.getters,rootState:e.state},o);if(!B(n)){n=Promise.resolve(n)}if(e._devtoolHook){return n.catch((function(t){e._devtoolHook.emit("vuex:error",t);throw t}))}else{return n}}))}function L(e,t,r,i){if(e._wrappedGetters[t]){{console.error("[vuex] duplicate getter key: "+t)}return}e._wrappedGetters[t]=function e(t){return r(i.state,i.getters,t.state,t.getters)}}function G(e){o.watch((function(){return e._state.data}),(function(){{C(e._committing,"do not mutate vuex store state outside mutation handlers.")}}),{deep:true,flush:"sync"})}function U(e,t){return t.reduce((function(e,t){return e[t]}),e)}function X(e,t,r){if(V(e)&&e.type){r=t;t=e;e=e.type}{C(typeof e==="string","expects string as the type, but found "+typeof e+".")}return{type:e,payload:t,options:r}}var F="vuex bindings";var R="vuex:mutations";var H="vuex:actions";var $="vuex";var J=0;function W(e,t){_({id:"org.vuejs.vuex",app:e,label:"Vuex",homepage:"https://next.vuex.vuejs.org/",logo:"https://vuejs.org/images/icons/favicon-96x96.png",packageName:"vuex",componentStateTypes:[F]},(function(r){r.addTimelineLayer({id:R,label:"Vuex Mutations",color:K});r.addTimelineLayer({id:H,label:"Vuex Actions",color:K});r.addInspector({id:$,label:"Vuex",icon:"storage",treeFilterPlaceholder:"Filter stores..."});r.on.getInspectorTree((function(r){if(r.app===e&&r.inspectorId===$){if(r.filter){var i=[];ee(i,t._modules.root,r.filter,"");r.rootNodes=i}else{r.rootNodes=[Z(t._modules.root,"")]}}}));r.on.getInspectorState((function(r){if(r.app===e&&r.inspectorId===$){var i=r.nodeId;N(t,i);r.state=te(ie(t._modules,i),i==="root"?t.getters:t._makeLocalGettersCache,i)}}));r.on.editInspectorState((function(r){if(r.app===e&&r.inspectorId===$){var i=r.nodeId;var o=r.path;if(i!=="root"){o=i.split("/").filter(Boolean).concat(o)}t._withCommit((function(){r.set(t._state.data,o,r.state.value)}))}}));t.subscribe((function(e,t){var i={};if(e.payload){i.payload=e.payload}i.state=t;r.notifyComponentUpdate();r.sendInspectorTree($);r.sendInspectorState($);r.addTimelineEvent({layerId:R,event:{time:Date.now(),title:e.type,data:i}})}));t.subscribeAction({before:function(e,t){var i={};if(e.payload){i.payload=e.payload}e._id=J++;e._time=Date.now();i.state=t;r.addTimelineEvent({layerId:H,event:{time:e._time,title:e.type,groupId:e._id,subtitle:"start",data:i}})},after:function(e,t){var i={};var o=Date.now()-e._time;i.duration={_custom:{type:"duration",display:o+"ms",tooltip:"Action duration",value:o}};if(e.payload){i.payload=e.payload}i.state=t;r.addTimelineEvent({layerId:H,event:{time:Date.now(),title:e.type,groupId:e._id,subtitle:"end",data:i}})}})}))}var K=8702998;var q=6710886;var z=16777215;var Q={label:"namespaced",textColor:z,backgroundColor:q};function Y(e){return e&&e!=="root"?e.split("/").slice(-2,-1)[0]:"Root"}function Z(e,t){return{id:t||"root",label:Y(t),tags:e.namespaced?[Q]:[],children:Object.keys(e._children).map((function(r){return Z(e._children[r],t+r+"/")}))}}function ee(e,t,r,i){if(i.includes(r)){e.push({id:i||"root",label:i.endsWith("/")?i.slice(0,i.length-1):i||"Root",tags:t.namespaced?[Q]:[]})}Object.keys(t._children).forEach((function(o){ee(e,t._children[o],r,i+o+"/")}))}function te(e,t,r){t=r==="root"?t:t[r];var i=Object.keys(t);var o={state:Object.keys(e.state).map((function(t){return{key:t,editable:true,value:e.state[t]}}))};if(i.length){var n=re(t);o.getters=Object.keys(n).map((function(e){return{key:e.endsWith("/")?Y(e):e,editable:false,value:oe((function(){return n[e]}))}}))}return o}function re(e){var t={};Object.keys(e).forEach((function(r){var i=r.split("/");if(i.length>1){var o=t;var n=i.pop();i.forEach((function(e){if(!o[e]){o[e]={_custom:{value:{},display:e,tooltip:"Module",abstract:true}}}o=o[e]._custom.value}));o[n]=oe((function(){return e[r]}))}else{t[r]=oe((function(){return e[r]}))}}));return t}function ie(e,t){var r=t.split("/").filter((function(e){return e}));return r.reduce((function(e,i,o){var n=e[i];if(!n){throw new Error('Missing module "'+i+'" for path "'+t+'".')}return o===r.length-1?n:n._children}),t==="root"?e:e.root._children)}function oe(e){try{return e()}catch(e){return e}}var ne=function e(t,r){this.runtime=r;this._children=Object.create(null);this._rawModule=t;var i=t.state;this.state=(typeof i==="function"?i():i)||{}};var se={namespaced:{configurable:true}};se.namespaced.get=function(){return!!this._rawModule.namespaced};ne.prototype.addChild=function e(t,r){this._children[t]=r};ne.prototype.removeChild=function e(t){delete this._children[t]};ne.prototype.getChild=function e(t){return this._children[t]};ne.prototype.hasChild=function e(t){return t in this._children};ne.prototype.update=function e(t){this._rawModule.namespaced=t.namespaced;if(t.actions){this._rawModule.actions=t.actions}if(t.mutations){this._rawModule.mutations=t.mutations}if(t.getters){this._rawModule.getters=t.getters}};ne.prototype.forEachChild=function e(t){O(this._children,t)};ne.prototype.forEachGetter=function e(t){if(this._rawModule.getters){O(this._rawModule.getters,t)}};ne.prototype.forEachAction=function e(t){if(this._rawModule.actions){O(this._rawModule.actions,t)}};ne.prototype.forEachMutation=function e(t){if(this._rawModule.mutations){O(this._rawModule.mutations,t)}};Object.defineProperties(ne.prototype,se);var ae=function e(t){this.register([],t,false)};ae.prototype.get=function e(t){return t.reduce((function(e,t){return e.getChild(t)}),this.root)};ae.prototype.getNamespace=function e(t){var r=this.root;return t.reduce((function(e,t){r=r.getChild(t);return e+(r.namespaced?t+"/":"")}),"")};ae.prototype.update=function e(t){ue([],this.root,t)};ae.prototype.register=function e(t,r,i){var o=this;if(i===void 0)i=true;{fe(t,r)}var n=new ne(r,i);if(t.length===0){this.root=n}else{var s=this.get(t.slice(0,-1));s.addChild(t[t.length-1],n)}if(r.modules){O(r.modules,(function(e,r){o.register(t.concat(r),e,i)}))}};ae.prototype.unregister=function e(t){var r=this.get(t.slice(0,-1));var i=t[t.length-1];var o=r.getChild(i);if(!o){{console.warn("[vuex] trying to unregister module '"+i+"', which is "+"not registered")}return}if(!o.runtime){return}r.removeChild(i)};ae.prototype.isRegistered=function e(t){var r=this.get(t.slice(0,-1));var i=t[t.length-1];if(r){return r.hasChild(i)}return false};function ue(e,t,r){{fe(e,r)}t.update(r);if(r.modules){for(var i in r.modules){if(!t.getChild(i)){{console.warn("[vuex] trying to add a new module '"+i+"' on hot reloading, "+"manual reload is needed")}return}ue(e.concat(i),t.getChild(i),r.modules[i])}}}var ce={assert:function(e){return typeof e==="function"},expected:"function"};var le={assert:function(e){return typeof e==="function"||typeof e==="object"&&typeof e.handler==="function"},expected:'function or object with "handler" function'};var de={getters:ce,mutations:ce,actions:le};function fe(e,t){Object.keys(de).forEach((function(r){if(!t[r]){return}var i=de[r];O(t[r],(function(t,o){C(i.assert(t),he(e,r,o,t,i.expected))}))}))}function he(e,t,r,i,o){var n=t+" should be "+o+' but "'+t+"."+r+'"';if(e.length>0){n+=' in module "'+e.join(".")+'"'}n+=" is "+JSON.stringify(i)+".";return n}function pe(e){return new me(e)}var me=function e(t){var r=this;if(t===void 0)t={};{C(typeof Promise!=="undefined","vuex requires a Promise polyfill in this browser.");C(this instanceof e,"store must be called with the new operator.")}var i=t.plugins;if(i===void 0)i=[];var o=t.strict;if(o===void 0)o=false;var n=t.devtools;this._committing=false;this._actions=Object.create(null);this._actionSubscribers=[];this._mutations=Object.create(null);this._wrappedGetters=Object.create(null);this._modules=new ae(t);this._modulesNamespaceMap=Object.create(null);this._subscribers=[];this._makeLocalGettersCache=Object.create(null);this._devtools=n;var s=this;var a=this;var u=a.dispatch;var c=a.commit;this.dispatch=function e(t,r){return u.call(s,t,r)};this.commit=function e(t,r,i){return c.call(s,t,r,i)};this.strict=o;var l=this._modules.root.state;E(this,l,[],this._modules.root);j(this,l);i.forEach((function(e){return e(r)}))};var ge={state:{configurable:true}};me.prototype.install=function e(t,r){t.provide(r||S,this);t.config.globalProperties.$store=this;var i=this._devtools!==undefined?this._devtools:true;if(i){W(t,this)}};ge.state.get=function(){return this._state.data};ge.state.set=function(e){{C(false,"use store.replaceState() to explicit replace store state.")}};me.prototype.commit=function e(t,r,i){var o=this;var n=X(t,r,i);var s=n.type;var a=n.payload;var u=n.options;var c={type:s,payload:a};var l=this._mutations[s];if(!l){{console.error("[vuex] unknown mutation type: "+s)}return}this._withCommit((function(){l.forEach((function e(t){t(a)}))}));this._subscribers.slice().forEach((function(e){return e(c,o.state)}));if(u&&u.silent){console.warn("[vuex] mutation type: "+s+". Silent option has been removed. "+"Use the filter functionality in the vue-devtools")}};me.prototype.dispatch=function e(t,r){var i=this;var o=X(t,r);var n=o.type;var s=o.payload;var a={type:n,payload:s};var u=this._actions[n];if(!u){{console.error("[vuex] unknown action type: "+n)}return}try{this._actionSubscribers.slice().filter((function(e){return e.before})).forEach((function(e){return e.before(a,i.state)}))}catch(e){{console.warn("[vuex] error in before action subscribers: ");console.error(e)}}var c=u.length>1?Promise.all(u.map((function(e){return e(s)}))):u[0](s);return new Promise((function(e,t){c.then((function(t){try{i._actionSubscribers.filter((function(e){return e.after})).forEach((function(e){return e.after(a,i.state)}))}catch(e){{console.warn("[vuex] error in after action subscribers: ");console.error(e)}}e(t)}),(function(e){try{i._actionSubscribers.filter((function(e){return e.error})).forEach((function(t){return t.error(a,i.state,e)}))}catch(e){{console.warn("[vuex] error in error action subscribers: ");console.error(e)}}t(e)}))}))};me.prototype.subscribe=function e(t,r){return I(t,this._subscribers,r)};me.prototype.subscribeAction=function e(t,r){var i=typeof t==="function"?{before:t}:t;return I(i,this._actionSubscribers,r)};me.prototype.watch=function e(t,r,i){var n=this;{C(typeof t==="function","store.watch only accepts a function.")}return o.watch((function(){return t(n.state,n.getters)}),r,Object.assign({},i))};me.prototype.replaceState=function e(t){var r=this;this._withCommit((function(){r._state.data=t}))};me.prototype.registerModule=function e(t,r,i){if(i===void 0)i={};if(typeof t==="string"){t=[t]}{C(Array.isArray(t),"module path must be a string or an Array.");C(t.length>0,"cannot register the root module by using registerModule.")}this._modules.register(t,r);E(this,this.state,t,this._modules.get(t),i.preserveState);j(this,this.state)};me.prototype.unregisterModule=function e(t){var r=this;if(typeof t==="string"){t=[t]}{C(Array.isArray(t),"module path must be a string or an Array.")}this._modules.unregister(t);this._withCommit((function(){var e=U(r.state,t.slice(0,-1));delete e[t[t.length-1]]}));A(this)};me.prototype.hasModule=function e(t){if(typeof t==="string"){t=[t]}{C(Array.isArray(t),"module path must be a string or an Array.")}return this._modules.isRegistered(t)};me.prototype.hotUpdate=function e(t){this._modules.update(t);A(this,true)};me.prototype._withCommit=function e(t){var r=this._committing;this._committing=true;t();this._committing=r};Object.defineProperties(me.prototype,ge);var ve=Me((function(e,t){var r={};if(!xe(t)){console.error("[vuex] mapState: mapper parameter must be either an Array or an Object")}we(t).forEach((function(t){var i=t.key;var o=t.val;r[i]=function t(){var r=this.$store.state;var i=this.$store.getters;if(e){var n=Oe(this.$store,"mapState",e);if(!n){return}r=n.context.state;i=n.context.getters}return typeof o==="function"?o.call(this,r,i):r[o]};r[i].vuex=true}));return r}));var be=Me((function(e,t){var r={};if(!xe(t)){console.error("[vuex] mapMutations: mapper parameter must be either an Array or an Object")}we(t).forEach((function(t){var i=t.key;var o=t.val;r[i]=function t(){var r=[],i=arguments.length;while(i--)r[i]=arguments[i];var n=this.$store.commit;if(e){var s=Oe(this.$store,"mapMutations",e);if(!s){return}n=s.context.commit}return typeof o==="function"?o.apply(this,[n].concat(r)):n.apply(this.$store,[o].concat(r))}}));return r}));var ye=Me((function(e,t){var r={};if(!xe(t)){console.error("[vuex] mapGetters: mapper parameter must be either an Array or an Object")}we(t).forEach((function(t){var i=t.key;var o=t.val;o=e+o;r[i]=function t(){if(e&&!Oe(this.$store,"mapGetters",e)){return}if(!(o in this.$store.getters)){console.error("[vuex] unknown getter: "+o);return}return this.$store.getters[o]};r[i].vuex=true}));return r}));var _e=Me((function(e,t){var r={};if(!xe(t)){console.error("[vuex] mapActions: mapper parameter must be either an Array or an Object")}we(t).forEach((function(t){var i=t.key;var o=t.val;r[i]=function t(){var r=[],i=arguments.length;while(i--)r[i]=arguments[i];var n=this.$store.dispatch;if(e){var s=Oe(this.$store,"mapActions",e);if(!s){return}n=s.context.dispatch}return typeof o==="function"?o.apply(this,[n].concat(r)):n.apply(this.$store,[o].concat(r))}}));return r}));var Se=function(e){return{mapState:ve.bind(null,e),mapGetters:ye.bind(null,e),mapMutations:be.bind(null,e),mapActions:_e.bind(null,e)}};function we(e){if(!xe(e)){return[]}return Array.isArray(e)?e.map((function(e){return{key:e,val:e}})):Object.keys(e).map((function(t){return{key:t,val:e[t]}}))}function xe(e){return Array.isArray(e)||V(e)}function Me(e){return function(t,r){if(typeof t!=="string"){r=t;t=""}else if(t.charAt(t.length-1)!=="/"){t+="/"}return e(t,r)}}function Oe(e,t,r){var i=e._modulesNamespaceMap[r];if(!i){console.error("[vuex] module namespace not found in "+t+"(): "+r)}return i}function Ve(e){if(e===void 0)e={};var t=e.collapsed;if(t===void 0)t=true;var r=e.filter;if(r===void 0)r=function(e,t,r){return true};var i=e.transformer;if(i===void 0)i=function(e){return e};var o=e.mutationTransformer;if(o===void 0)o=function(e){return e};var n=e.actionFilter;if(n===void 0)n=function(e,t){return true};var s=e.actionTransformer;if(s===void 0)s=function(e){return e};var a=e.logMutations;if(a===void 0)a=true;var u=e.logActions;if(u===void 0)u=true;var c=e.logger;if(c===void 0)c=console;return function(e){var l=M(e.state);if(typeof c==="undefined"){return}if(a){e.subscribe((function(e,n){var s=M(n);if(r(e,l,s)){var a=Te();var u=o(e);var d="mutation "+e.type+a;Be(c,d,t);c.log("%c prev state","color: #9E9E9E; font-weight: bold",i(l));c.log("%c mutation","color: #03A9F4; font-weight: bold",u);c.log("%c next state","color: #4CAF50; font-weight: bold",i(s));Ce(c)}l=s}))}if(u){e.subscribeAction((function(e,r){if(n(e,r)){var i=Te();var o=s(e);var a="action "+e.type+i;Be(c,a,t);c.log("%c action","color: #03A9F4; font-weight: bold",o);Ce(c)}}))}}}function Be(e,t,r){var i=r?e.groupCollapsed:e.group;try{i.call(e,t)}catch(r){e.log(t)}}function Ce(e){try{e.groupEnd()}catch(t){e.log("--- log end ---")}}function Te(){var e=new Date;return" @ "+Ae(e.getHours(),2)+":"+Ae(e.getMinutes(),2)+":"+Ae(e.getSeconds(),2)+"."+Ae(e.getMilliseconds(),3)}function Ie(e,t){return new Array(t+1).join(e)}function Ae(e,t){return Ie("0",t-e.toString().length)+e}const je="4.0.2";e.Builder=g;e.BuilderModel=d;e.BuilderDatabaseType=m;e.Store=me;e.createLogger=Ve;e.createNamespacedHelpers=Se;e.createStore=pe;e.mapActions=_e;e.mapGetters=ye;e.mapMutations=be;e.mapState=ve;e.storeKey=S;e.useStore=w;e.version=je})(this.BX.Vue3.Vuex=this.BX.Vue3.Vuex||{},BX.Dexie3,BX,BX,BX.Vue3)})();
//# sourceMappingURL=vuex.bundle.map.js